<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div{
            position: relative;
            width: 200px;
            height: 50px;
            border: 1px solid black;
        }
        div::after{
            position: absolute;
            top: 18px;
            right: 20px;
            width: 7px;
            height: 7px;
            content: '';
            border-left:1px solid black ;
            border-bottom:1px solid black ;
            transform: rotate(135deg);
            transition: all .5s;
        }
        div:hover::after{
            transform: rotate(-45deg);

        }
    </style>
</head>
<body>
    <div>
    </div>
</body>
</html>